Optimal. Leaf size=161 \[ -\frac{i \text{CosIntegral}\left (\frac{2 c f}{d}+2 f x\right ) \sin \left (2 e-\frac{2 c f}{d}\right )}{2 a d}+\frac{\text{CosIntegral}\left (\frac{2 c f}{d}+2 f x\right ) \cos \left (2 e-\frac{2 c f}{d}\right )}{2 a d}-\frac{\sin \left (2 e-\frac{2 c f}{d}\right ) \text{Si}\left (2 x f+\frac{2 c f}{d}\right )}{2 a d}-\frac{i \cos \left (2 e-\frac{2 c f}{d}\right ) \text{Si}\left (2 x f+\frac{2 c f}{d}\right )}{2 a d}+\frac{\log (c+d x)}{2 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.276545, antiderivative size = 161, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 4, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.174, Rules used = {3726, 3303, 3299, 3302} \[ -\frac{i \text{CosIntegral}\left (\frac{2 c f}{d}+2 f x\right ) \sin \left (2 e-\frac{2 c f}{d}\right )}{2 a d}+\frac{\text{CosIntegral}\left (\frac{2 c f}{d}+2 f x\right ) \cos \left (2 e-\frac{2 c f}{d}\right )}{2 a d}-\frac{\sin \left (2 e-\frac{2 c f}{d}\right ) \text{Si}\left (2 x f+\frac{2 c f}{d}\right )}{2 a d}-\frac{i \cos \left (2 e-\frac{2 c f}{d}\right ) \text{Si}\left (2 x f+\frac{2 c f}{d}\right )}{2 a d}+\frac{\log (c+d x)}{2 a d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3726
Rule 3303
Rule 3299
Rule 3302
Rubi steps
\begin{align*} \int \frac{1}{(c+d x) (a+i a \tan (e+f x))} \, dx &=\frac{\log (c+d x)}{2 a d}-\frac{i \int \frac{\sin (2 e+2 f x)}{c+d x} \, dx}{2 a}+\frac{\int \frac{\cos (2 e+2 f x)}{c+d x} \, dx}{2 a}\\ &=\frac{\log (c+d x)}{2 a d}-\frac{\left (i \cos \left (2 e-\frac{2 c f}{d}\right )\right ) \int \frac{\sin \left (\frac{2 c f}{d}+2 f x\right )}{c+d x} \, dx}{2 a}+\frac{\cos \left (2 e-\frac{2 c f}{d}\right ) \int \frac{\cos \left (\frac{2 c f}{d}+2 f x\right )}{c+d x} \, dx}{2 a}-\frac{\left (i \sin \left (2 e-\frac{2 c f}{d}\right )\right ) \int \frac{\cos \left (\frac{2 c f}{d}+2 f x\right )}{c+d x} \, dx}{2 a}-\frac{\sin \left (2 e-\frac{2 c f}{d}\right ) \int \frac{\sin \left (\frac{2 c f}{d}+2 f x\right )}{c+d x} \, dx}{2 a}\\ &=\frac{\cos \left (2 e-\frac{2 c f}{d}\right ) \text{Ci}\left (\frac{2 c f}{d}+2 f x\right )}{2 a d}+\frac{\log (c+d x)}{2 a d}-\frac{i \text{Ci}\left (\frac{2 c f}{d}+2 f x\right ) \sin \left (2 e-\frac{2 c f}{d}\right )}{2 a d}-\frac{i \cos \left (2 e-\frac{2 c f}{d}\right ) \text{Si}\left (\frac{2 c f}{d}+2 f x\right )}{2 a d}-\frac{\sin \left (2 e-\frac{2 c f}{d}\right ) \text{Si}\left (\frac{2 c f}{d}+2 f x\right )}{2 a d}\\ \end{align*}
Mathematica [A] time = 0.310651, size = 166, normalized size = 1.03 \[ \frac{\sec (e+f x) \left (\sin \left (f \left (\frac{c}{d}+x\right )\right )-i \cos \left (f \left (\frac{c}{d}+x\right )\right )\right ) \left (\text{CosIntegral}\left (\frac{2 f (c+d x)}{d}\right ) \left (\cos \left (e-\frac{c f}{d}\right )-i \sin \left (e-\frac{c f}{d}\right )\right )+\text{Si}\left (\frac{2 f (c+d x)}{d}\right ) \left (-\sin \left (e-\frac{c f}{d}\right )-i \cos \left (e-\frac{c f}{d}\right )\right )+\log (f (c+d x)) \left (\cos \left (e-\frac{c f}{d}\right )+i \sin \left (e-\frac{c f}{d}\right )\right )\right )}{2 a d (\tan (e+f x)-i)} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.15, size = 65, normalized size = 0.4 \begin{align*}{\frac{\ln \left ( dx+c \right ) }{2\,ad}}-{\frac{1}{2\,ad}{{\rm e}^{{\frac{2\,i \left ( cf-de \right ) }{d}}}}{\it Ei} \left ( 1,2\,ifx+2\,ie+{\frac{2\,i \left ( cf-de \right ) }{d}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.19139, size = 149, normalized size = 0.93 \begin{align*} -\frac{f \cos \left (-\frac{2 \,{\left (d e - c f\right )}}{d}\right ) E_{1}\left (\frac{2 i \,{\left (f x + e\right )} d - 2 i \, d e + 2 i \, c f}{d}\right ) + i \, f E_{1}\left (\frac{2 i \,{\left (f x + e\right )} d - 2 i \, d e + 2 i \, c f}{d}\right ) \sin \left (-\frac{2 \,{\left (d e - c f\right )}}{d}\right ) - f \log \left ({\left (f x + e\right )} d - d e + c f\right )}{2 \, a d f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.59565, size = 119, normalized size = 0.74 \begin{align*} \frac{{\rm Ei}\left (\frac{-2 i \, d f x - 2 i \, c f}{d}\right ) e^{\left (\frac{-2 i \, d e + 2 i \, c f}{d}\right )} + \log \left (\frac{d x + c}{d}\right )}{2 \, a d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.17769, size = 192, normalized size = 1.19 \begin{align*} \frac{\cos \left (\frac{2 \, c f}{d}\right ) \operatorname{Ci}\left (-\frac{2 \,{\left (d f x + c f\right )}}{d}\right ) + \cos \left (2 \, e\right ) \log \left (d x + c\right ) + i \, \operatorname{Ci}\left (-\frac{2 \,{\left (d f x + c f\right )}}{d}\right ) \sin \left (\frac{2 \, c f}{d}\right ) + i \, \log \left (d x + c\right ) \sin \left (2 \, e\right ) - i \, \cos \left (\frac{2 \, c f}{d}\right ) \operatorname{Si}\left (\frac{2 \,{\left (d f x + c f\right )}}{d}\right ) + \sin \left (\frac{2 \, c f}{d}\right ) \operatorname{Si}\left (\frac{2 \,{\left (d f x + c f\right )}}{d}\right )}{2 \, a d \cos \left (2 \, e\right ) + 2 i \, a d \sin \left (2 \, e\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]